Imports Sys = System

Namespace Enhancements.Core
    ''' <summary>The exception that is thrown when a XML is not valid.</summary>
    <DebuggerStepThrough()> _
    Public NotInheritable Class IsXmlValidNotException
        Inherits AssertException

        Friend Sub New(ByVal _objectName As System.String, ByVal _objectXml() As System.Byte, ByVal _objectXmlSchema() As System.Byte)
            MyBase.New(_objectName)
            ObjectXml = _objectXml
            ObjectXmlSchema = _objectXmlSchema
        End Sub

        Private __ObjectXml() As System.Byte = CType(Sys.Array.CreateInstance(GetType(Byte), 0), Byte())
        ''' <summary>Gets the XML used as data.</summary>
        Public Property ObjectXml() As System.Byte()
            Get
                Return __ObjectXml
            End Get
            Private Set(ByVal _value() As System.Byte)
                __ObjectXml = _value
            End Set
        End Property

        Private __ObjectXmlSchema() As System.Byte = CType(Sys.Array.CreateInstance(GetType(Byte), 0), Byte())
        ''' <summary>Gets the XML Schema used as validation.</summary>
        Public Property ObjectXmlSchema() As System.Byte()
            Get
                Return __ObjectXmlSchema
            End Get
            Private Set(ByVal _value() As System.Byte)
                __ObjectXmlSchema = _value
            End Set
        End Property

    End Class
End Namespace
